<?php

namespace App\Params\Common;

use App\Params\BaseParam;

class OrderListParams extends BaseParam
{
    public $page;
    public $page_size;
    public $mid;

    public $key;

    public $lt_time;
    public $gt_time;
    public $address;
    public $pay_type;
    public $is_multipart;
    public $multipart_status;
    public $pay_status;

    public $sn;

    public $title;

    public $special_id;

    public function getLtTime()
    {
        return $this->lt_time;
    }

    public function getGtTime()
    {
        return $this->gt_time;
    }

    public function getAddress()
    {
        return $this->address;
    }

    public function getPayType()
    {
        return $this->pay_type;
    }

    public function getIsMultipart()
    {
        return $this->is_multipart;
    }

    public function getMultipartStatus()
    {
        return $this->multipart_status;
    }

    public function getPayStatus()
    {
        return $this->pay_status;
    }

    public function getSpecialId()
    {
        return $this->special_id;
    }

    public function getMid()
    {
        return $this->mid;
    }

    public function getPage(): int
    {
        return (int)$this->page > 0 ? --$this->page : 0;
    }

    public function getPageSize(): int
    {
        return $this->page_size > 0 && $this->page_size < 100 ? (int)$this->page_size : 10;
    }
}
